package interfaceImp;

import java.rmi.RemoteException;

import interfaces.Heartbeat;

public class HeartbeatImpl implements Heartbeat {

	static boolean beat1,beat2,beat3,beat4;

	@Override
	public synchronized void setBeat1(boolean beat) throws RemoteException, Exception {
		beat1=beat;}

	@Override
	public synchronized void setBeat2(boolean beat) throws RemoteException, Exception {
		beat2=beat;}

	@Override
	public synchronized void setBeat3(boolean beat) throws RemoteException, Exception {
		beat3=beat;
		
	}

	@Override
	public synchronized void setBeat4(boolean beat) throws RemoteException, Exception {
		beat4=beat;
		
	}

	@Override
	public synchronized boolean isBeat1() throws RemoteException, Exception {
		return beat1;
	}

	@Override
	public synchronized boolean isBeat2() throws RemoteException, Exception {
		return beat2;
	}

	@Override
	public synchronized boolean isBeat3() throws RemoteException, Exception {
		return beat3;
	}

	@Override
	public synchronized boolean isBeat4() throws RemoteException, Exception {
		return beat4;
	}

}
